package com.easypan.annotation;

import com.easypan.entity.enums.VerifyRegexEnum;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.PARAMETER,ElementType.FIELD})//定义在参数和属性商
public @interface VerifyParam {

    int min() default -1;//不校验最小值

    int max() default -1;//不校验最大值

    boolean required() default false;

    //正则校验
    VerifyRegexEnum regex() default VerifyRegexEnum.NO;
}
